package com.jk.controller;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName RabbitmqController
 * @Descripttion TODO
 * @Author binzi
 * @Date 2022/10/23 16:05
 * @Version 0.001
 */
@RestController
public class RabbitmqController {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    /**
    * @Author: binzi
    * @Description:发送
    * @Date: 2022/10/23 16:58
    * @Return: void
    ** @param record_id
    **/
    @RequestMapping("sendOne")
    public void  sendOne(Integer record_id){
        rabbitTemplate.convertAndSend("binzi",record_id);
        System.out.println("发送成功");
    }





}
